package com.weixing.mall.provider.api.service;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.fallback.AgentProfitFeignFallback;
import com.weixing.mall.provider.api.model.dto.ProfitCalcDto;
import com.weixing.mall.provider.api.model.vo.OrderSettleVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/8/2 17:36
 * @Modified By:
 */
@FeignClient(value = "mall-provider-agent", configuration = FeignRibbonClientAutoConfiguration.class, fallback = AgentProfitFeignFallback.class)
public interface AgentProfitFeign {
    @PostMapping("api/agent/profit/calc")
    Result calcProfit(@RequestBody ProfitCalcDto profitCalc);


    @PostMapping("api/agent/profit/actCalc")
    Result actCalcProfit(@RequestParam(value = "actId") Long actId);

    @PostMapping("api/agent/profit/unProfit")
    Result unProfit(@RequestParam(value = "orderId") Long orderId);

    @PostMapping("api/agent/profit/query")
    Result<OrderSettleVo> orderSettleQuery(@RequestBody ProfitCalcDto profitCalc);



}
